package com.pacy.pacybaseproject.viewmodels;

import android.app.Application;
import android.os.Bundle;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.listener.OnItemClickListener;
import com.pacy.pacybaseproject.R;
import com.pacy.pacybaseproject.activitys.ExchangeDetailActivity;
import com.pacy.pacybaseproject.adapters.IntegralPayAdapter;
import com.pacy.pacybaseproject.adapters.RedempPointsAdapter;
import com.pacy.pacybaseproject.adapters.RedempPointsExPayAdapter;
import com.pacy.pacybaseproject.beans.MenuBean;

import java.util.ArrayList;
import java.util.List;

import me.goldze.mvvmhabit.base.BaseViewModel;

/**
 * @author PACY
 * @date 2024/4/26
 * description:
 */
public class RedempPointsExPayViewModel extends BaseViewModel {
    public RedempPointsExPayAdapter mAdapter;
    public RedempPointsExPayViewModel(Application application) {
        super(application);
    }

    @Override
    protected void init() {
        super.init();
        initAdapter();
    }

    private void initAdapter(){
        mAdapter=new RedempPointsExPayAdapter();
        List<MenuBean> datas=new ArrayList<>();
        datas.add(new MenuBean("火炉自助餐(廊坊万达店)",R.drawable.delete_dx_1,"678m"));
        datas.add(new MenuBean("二宽 · 家宴（文明路店）",R.drawable.delete_dx_2,"445m"));
        datas.add(new MenuBean("张家菜馆（二店）",R.drawable.delete_dx_3,"234m"));
        datas.add(new MenuBean("Marina牛排屋·干式熟牛排",R.drawable.delete_dx_4,"678m"));
        datas.add(new MenuBean("董家·知味中餐厅",R.drawable.delete_dx_5,"700m"));
        datas.add(new MenuBean("七十六·餐厅",R.drawable.delete_dx_6,"1.2km"));
        mAdapter.setNewInstance(datas);

        mAdapter.setOnItemClickListener(new OnItemClickListener() {
            @Override
            public void onItemClick(BaseQuickAdapter<?, ?> adapter, View view, int position) {
//                startActivity(ExchangeDetailActivity.class);
            }
        });
    }
}
